package com.example.ecbanner;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.ImageView;

import java.util.ArrayList;

public class MainActivity extends AppCompatActivity {
    private CycleBannerView mCbView;
    private ArrayList<ImageView> mListbanner=new ArrayList<ImageView>();
    private ImageView m1;
    private ImageView m2;
    private ImageView m3;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        m1=new ImageView(this,null,R.drawable.about_icon_qq);
        m2=new ImageView(this,null,R.drawable.about_icon_web);
        m3=new ImageView(this,null,R.drawable.about_icon_mail);
        mCbView = (CycleBannerView) findViewById(R.id.cb_view);
        mListbanner.add(m1);
        mListbanner.add(m2);
        mListbanner.add(m3);
        mCbView.setImgSources(mListbanner);
    }
}
